import { http } from "./http";

/** 获取更新日志 */
export function getUpdateLog() {
    return http.get("/log");
}

/** 获取百宝箱信息 */
export function getTreasure() {
    return http.get("/checkTreasure");
}

/** 获取额度记录 */
export function getLimitLog() {
    return http.get("/selectquotaju");
}

/** 资源库 */
export function getFistDir() {
    return http.get("/parent_directory");
}
export function getSecondDir(pid: number) {
    return http({
        method: 'post',
        url: '/second_directory',
        params: {
            pid
        }
    });
}
export function getFirstDirCont(pid: number) {
    return http({
        method: 'post',
        url: '/directory_data',
        params: {
            pid
        }
    });
} 
export function getSecondDirCont(sid: number) {
    return http({
        method: 'post',
        url: '/second_directory_data',
        params: {
            sid
        }
    });
}

/** 额度申请 */
export function appliLimit(limit: number) {
    return http({
        method: 'post',
        url: '/addApplication',
        params: {
            limit
        }
    });
}
/** 转让额度 */
export function transLimit(params: any) {
    return http({
        method: 'post',
        url: '/transfer',
        params
    });
}

/** 修改用户信息 */
export function updateUserInfo(params: any) {
    return http({
        method: 'post',
        url: '/xgUser',
        params
    });
}

/** 修改密码 */
export function updatePassword(params: any) {
    return http({
        method: 'post',
        url: '/xgPassword',
        params
    });
}